import {defineConfig} from "vite";
import vue from "@vitejs/plugin-vue";

import {join} from "path";
/*从vite-plugin-qiankun插件引入qiankun，qiankun默认不支持vite构建的项目*/
import qiankun from "vite-plugin-qiankun";

export default defineConfig({
    base: "http://localhost:8080",
    plugins: [
        vue(),
        // 这里的名称要和主应用改造是配置项中的name保持一致
        qiankun("BigScreen", {
            useDevMode: true,
        }),
    ],
    server: {
        // 防止开发阶段的assets 静态资源加载问题
        origin: "//localhost:5173",
    },
    resolve: {
        alias: {
            "@": join(__dirname, "src"),
        },
    },
});
